<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #info {
            width: 200px;
            height: 300px;
        }
    </style>
</head>

<body>
    <!-- 2. 点击登陆 弹出登录框点击X关闭登录框   -->
    <div id="app">
        <button @click="login">登录</button>
        <div id="info" v-if="display">
            <input type="text">
            <button @click="clode">X</button>
        </div>

    </div>

</body>
<script src="/vue.js"></script>
<script>
    const { createApp, ref } = Vue
    createApp({
        setup() {
            let display = ref(false)
            function login() {
                display.value = true
            }
            function clode() {
                display.value = false
            }
            return {
                login,
                display,
                clode
            }
        }
    }).mount("#app")
</script>

</html>